<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>(core-lib)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="logo.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">(core-lib)</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div><div class="header">
  <div class="headertitle"><div class="title">Core Library </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p ><a class="anchor" id="md_output_README_doxygen"></a> </p>
<h1><a class="anchor" id="autotoc_md1"></a>
Overview</h1>
<p >The Core Library provides basic types and utilities that can be used between different devices. This allows different libraries to share common items between themselves to avoid reimplementation and promote consistency.</p>
<h1><a class="anchor" id="autotoc_md2"></a>
Features</h1>
<ul>
<li>Common result type (<a class="el" href="group__group__result.html#gaca79700fcc701534ce61778a9bcf57d1">cy_rslt_t</a> and <code><a class="el" href="group__group__result.html#unioncy__rslt__decode__t" title="Provides the result of an operation as a structured bitfield.">cy_rslt_decode_t</a></code>) for reporting errors or status</li>
<li>Common utility MACROs for<ul>
<li><code>CY_ASSERT</code>: Verifies a value and halts if invalid (if not NDEBUG)</li>
<li><code>CY_HALT</code>: Halts the application</li>
<li><code>CY_UNUSED_PARAMETER</code>: Avoid warnings if a function argument isn't used</li>
<li><code>CY_LO8</code>: Gets the lower 8 bits of a 16-bit value</li>
<li><code>CY_HI8</code>: Gets the upper 8 bits of a 16-bit value</li>
<li><code>CY_LO16</code>: Gets the lower 16 bits of a 32-bit value</li>
<li><code>CY_HI16</code>: Gets the upper 16 bits of a 32-bit value</li>
<li><code>CY_SWAP_ENDIAN16</code>: Swaps the byte ordering of a 16-bit value</li>
<li><code>CY_SWAP_ENDIAN32</code>: Swaps the byte ordering of a 32-bit value</li>
<li><code>CY_SWAP_ENDIAN64</code>: Swaps the byte ordering of a 64-bit value</li>
<li><code>CY_GET_REG8</code>: Reads the 8-bit value from the specified address</li>
<li><code>CY_SET_REG8</code>: Writes an 8-bit value to the specified address</li>
<li><code>CY_GET_REG16</code>: Reads the 16-bit value from the specified address</li>
<li><code>CY_SET_REG16</code>: Writes the 16-bit value to the specified address</li>
<li><code>CY_GET_REG24</code>: Reads the 24-bit value from the specified address</li>
<li><code>CY_SET_REG24</code>: Writes the 24-bit value to the specified address</li>
<li><code>CY_GET_REG32</code>: Reads the 32-bit value from the specified register</li>
<li><code>CY_SET_REG32</code>: Writes the 32-bit value to the specified register</li>
<li><code>_CLR_SET_FLD32U</code>: The macro for setting a register with a name field and value for providing get-clear-modify-write operations</li>
<li><code>CY_REG32_CLR_SET</code>: Uses _CLR_SET_FLD32U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 32-bit register</li>
<li><code>_CLR_SET_FLD16U</code>: The macro for setting a 16-bit register with a name field and value for providing get-clear-modify-write operations</li>
<li><code>CY_REG16_CLR_SET</code>: Uses _CLR_SET_FLD16U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 16-bit register</li>
<li><code>_CLR_SET_FLD8U</code>: The macro for setting a 8-bit register with a name field and value for providing get-clear-modify-write operations</li>
<li><code>CY_REG8_CLR_SET</code>: Uses _CLR_SET_FLD8U macro for providing get-clear-modify-write operations with a name field and value and writes a resulting value to the 8-bit register</li>
<li><code>_BOOL2FLD</code>: Returns a field mask if the value is not false</li>
<li><code>_FLD2BOOL</code>: Returns true, if the value includes the field mask</li>
<li><code>CY_SYSLIB_DIV_ROUND</code>: Calculates a / b with rounding to the nearest integer, a and b must have the same sign.</li>
<li><code>CY_SYSLIB_DIV_ROUNDUP</code>: Calculates a / b with rounding up if remainder != 0, both a and b must be positive.</li>
</ul>
</li>
<li>MACROs to create cross compiler compatible code. Use the CY_NOINIT, CY_SECTION, CY_UNUSED, CY_ALIGN attributes at the first place of declaration/definition. For example: CY_NOINIT uint32_t noinitVar;<ul>
<li><code>CY_NOINIT</code></li>
<li><code>CY_SECTION</code></li>
<li><code>CY_UNUSED</code></li>
<li><code>CY_NOINLINE</code></li>
<li><code>CY_ALIGN</code></li>
<li><code>CY_RAMFUNC_BEGIN</code></li>
<li><code>CY_RAMFUNC_END</code></li>
</ul>
</li>
</ul>
<h1><a class="anchor" id="autotoc_md3"></a>
More information</h1>
<ul>
<li><a href="https://infineon.github.io/core-lib/html/modules.html">API Reference Guide</a></li>
<li><a href="http://www.cypress.com">Cypress Semiconductor, an Infineon Technologies Company</a></li>
<li><a href="https://github.com/infineon">Infineon GitHub</a></li>
<li><a href="https://www.cypress.com/products/modustoolbox-software-environment">ModusToolbox™</a></li>
</ul>
<hr  />
<p> © Cypress Semiconductor Corporation (an Infineon company) or an affiliate of Cypress Semiconductor Corporation, 2019-2021. </p>
</div></div><!-- PageDoc -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>(core-lib)</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
